#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
long long factorial(int n)
{
    if (n > 1)
        return n * factorial(n - 1);
    else
        return 1;
}
int main()
{
    int n = 0;
    scanf("%d", &n);
    printf("%lld", factorial(n));
    return 0;
}